import Vue from 'vue' // 默认不包含模板编译器
import App from './App.vue'

new Vue({
  // render: h => h(App)
  data: {
    msg: 'atguigu'
  },
  render (createElement) {
    // 创建虚拟DOM对象
    // tag / data / children /key
    const vnode = createElement(
      'div',
      {
        attrs: {
          id: 'app2',
          name: 'b'
        }
      },
      // this.msg
      [createElement('p', {}, this.msg), createElement('span', {}, 'abc')]
    )

    console.log(vnode)

    // 返回vnode
    return vnode
  }
}).$mount('#app')
